package homework.api.day08._cp;

public class TryCatchDemo {
    public static void main(String[] args) {
        System.out.println("开始");

        try{
            String line ="qqqq";
            System.out.println(line.charAt(0));

            String line2 = "abc";
            System.out.println(Integer.parseInt(line2));

        }catch (StringIndexOutOfBoundsException e){
            System.out.println("下标越界异常");
        }catch (Exception e){
            System.out.println("其他异常");
        }

        System.out.println("结束");

    }
}
